﻿using NExt.Core.Model.Base;

namespace NExt
{
    public class DataView : DataView<DataViewEvents>
    {
    }

    public abstract class DataView<TEvents>: BoxComponent<TEvents>
        where TEvents : DataViewEvents, new()
    {
        public string emptyText { get; set; }
        public string itemSelector { get; set; }
        public string loadingText { get; set; }
        public bool? multiSelect { get; set; }
        public string overClass { get; set; }
        public string selectedClass { get; set; }
        public bool? simpleSelect { get; set; }
        public bool? singleSelect { get; set; }
        public NExt.data.Store store { get; set; }
        public NExt.XTemplate tpl { get; set; }
    }

    public class DataViewEvents: BoxComponentEvents
    {
        public IScript beforeclick { get; set; }
        public IScript beforeselect { get; set; }
        public IScript click { get; set; }
        public IScript containerclick { get; set; }
        public IScript contextmenu { get; set; }
        public IScript dblclick { get; set; }
        public IScript selectionchange { get; set; }
    }
}
